1. Field of the Invention
The present invention relates to an apparatus for receiving a packet for a TCP offload engine (TOE), and more particularly, to a hardware apparatus for receiving a packet for a TOE in which a processor can operate asynchronously with a receiving time of a practical packet by separately managing information needed to directly process the packet by using the processor and information to be stored in a host memory by analyzing a type of the packet received from the IP layer and it is possible to reduce an overhead that processes unnecessary information.
This work was supported by IT R&D program of MIC/IITA[2005-S-405-02, A Development of the Next Generation Internet Server).
2. Description of the Related Art
In the past, most of protocols are processed by using software in a central processing unit (CPU). Specifically, when receiving a packet, in order to process the packet, a protocol related task is performed by reading a header part from the packet stored in a buffer, and a payload part remaining is copied a user memory area.
Then, in order to increase a speed of processing a protocol, a TCP offload engine (TOE) is used. A part of tasks of the CPU is processed by a processor embedded in a TOE card. In this case, when a packet is received, it is determined whether the packet is a normal packet by calculating a checksum through a support of a media access control (MAC) or by allowing a processor to directly read the packet.
When the packet is normal, the type of the packet is identified. When the packet is a TCP/UDP packet, a socket is searched by using IP and port numbers of the packet. Then, the protocol is processed based on the information on the socket, and payload data is copied into a user memory area, if necessary. When the packet is not a TCP/UDP packet, the packet is processed in other way according to the type of the packet. For example, when the packet is an internet control message protocol (ICMP) echo packet, a response packet has to be transmitted.
When a processor has to rapidly process the packets before a receiving buffer is full. However, when the processor performs another task or when a buffer size is not sufficient, the buffer will be full, and packets may be lost.